<!DOCTYPE html>
<meta charset="UTF-8">
<div style="margin: 10px 0;"></div>
<table data-type="grid" title="简单的grid${rc.contextPath}" style="width: 700px; height: 250px"
	data-define="singleSelect:true,collapsible:true,
		method:'get',url: '${rc.contextPath}/assets/ui/jww/demo/testdata/grid_data1.json',
		onHeaderContextMenu:onHeaderContextMenu
		">
	<thead>
		<tr>
			<th data-define="field:'itemid',width:80">ID</th>
			<th data-define="field:'productid',width:200">产品名称</th>
			<th data-define="field:'listprice',width:80,align:'right'">成本</th>
			<th data-define="field:'unitcost',width:80,align:'right'">单价</th>
			<th data-define="field:'attr1',width:100">属性</th>
			<th data-define="field:'status',width:60,align:'center'">状态</th>
		</tr>
	</thead>
</table>

<script type="text/javascript">
function onHeaderContextMenu(e,f){
	alert(f);
	//$('#dg').grid('hideColumn', item.name);
	//$('#dg').grid('showColumn', item.name);
}
</script>
